package arithmetic.classLoaderTest;

import java.util.Random;

/**
 * Created by jiangfeng on 2017/10/15.
 */
public class LoadTest {

    public static final int a = 1;

    static {
        System.out.println(111);
    }
}

class LoadTest2 {

    public static int a = 2;

    static {
        System.out.println(222);
    }
}

class LoadTest3 {

    public static final int a = new Random().nextInt(3);

    static {
        System.out.println(333);
    }
}

class Test {

    public static void main(String[] args) {
        // ���н��
//		1
//		222
//		2
//		333
//		0
        // ˵�� ��final�����˵ľ�̬���������ʼ���࣬��final����ֻ��������ʱ���ܱ�ȷ��ʱ�ֻ��ʼ���ࡣ
        System.out.println(LoadTest.a);
        System.out.println(LoadTest2.a);
        System.out.println(LoadTest3.a);
    }
}
